package activitydao

import (
	"github.com/gogf/gf/v2/frame/g"
	"xr-game-server/entity"
)

var activityMap = make(map[uint64]*entity.Activity)

func Save(activity *entity.Activity) {
	g.DB().Model(string(entity.TbActivity)).Save(activity)
}

func GetActivityById(activityId uint64) *entity.Activity {

	var ret *entity.Activity
	g.Model(string(entity.TbActivity)).Unscoped().WherePri(activityId).Scan(&ret)
	return ret
}
